<?php
	Include "app/design.php";	// fichier php contenant les methode de creation du design general
	Include "app/session/session.php";	// fichier php de gestion des variables de session.
	
	//gestion du get
	if(isset($_GET['p']))
	{
		$pageId = $_GET['p'];
		if($pageId == 'acceuil') // si demande de sortie de session.
		{
			init_session();
		}
	}
	else
	{
		$pageId = 0; // redirection vers l'acceuil.
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <?php
            set_title("PAT LE GUEN !!!");
            set_css("style.css");

            echo "<link rel=\"stylesheet\" href=\"engine/css/videolightbox.css\" type=\"text/css\" />";

            echo "<style type=\"text/css\">#videogallery a#videolb{display:none}</style>";
            echo "<link href=\"engine/css/overlay-minimal.css\" type=\"text/css\" rel=\"stylesheet\">";

            set_javascript("jquery.tools.min.js");
            set_javascript("swfobject.js");
            set_javascript("videolightbox.js");
            set_javascript("script.js");
        ?>

        <style type="text/css">#videogallery a#videolb{display:none}</style>
    </head>
	
    <body>

        <?php //var_dump($_SESSION);	//debug ?>

        <script type="text/javascript">

            function onYouTubePlayerReady(playerId)
            {
                ytplayer = document.getElementById("video_overlay");
                ytplayer.setVolume(100);
            }

        </script>

        <div id="page">

            <div id="header"> </div>

            <div id="corps">

                <div id="menu">
                        <?php create_menu(); ?>
                </div>

                <div id="rightmargin"> </div>

                <div id="contenu">
                        <?php create_contenu($pageId);?>
                </div>

                <div id="superpat"></div>
                
            </div>

            <div id="footer"> </div>

             
            
        </div>

        <div id="facepat">
            <a href="http://www.facebook.com/PATXP" target="_blank" >
                <img alt="AdopteLeGuen"  src="img/Facebook.png" />
            </a>
        </div>
        
        <div id="adoptepat">
            <img alt="AdopteLeGuen"  src="img/ADOPTEPAT.png" />
        </div>

    </body>
</html>